# -*- coding: utf-8 -*-

from odoo import models, fields


class BasicHealExamAccessoryExamination(models.Model):
    _name = 'basic_heal_exam_accessory_examination'
    _description = '健康体检表-辅助检查表'

    healthCheck = fields.Char(string="体检编号", required=True)
    checkId = fields.Char(string="条码编号", required=True)
    resident_id = fields.Many2one("basic_info", ondelete='set null', string="居民ID", index=True)

    wht_bld_cell_cnt = fields.Float(string='白细胞总数')
    lymph_ratio = fields.Float(string='淋巴细胞比率')
    intmdate_cell_ratio = fields.Float(string='中间细胞比率')
    gralocyt_ratio = fields.Float(string='粒细胞比率')
    lymph = fields.Float(string='淋巴细胞')
    intmdate_cell = fields.Float(string='中间细胞')
    gralocyt = fields.Float(string='粒细胞')
    rd_bld_tl_num = fields.Float(string='红细胞总数')
    hemo = fields.Float(string='血红蛋白')
    hematcrt = fields.Float(string='红细胞压积')
    mn_corpslar_vol = fields.Float(string='红细胞平均体积')
    hemo_cnt = fields.Float(string='血红蛋白含量')
    hemo_cncentr = fields.Float(string='血红蛋白浓度')
    cff_var_rd_bld_cell_dist = fields.Float(string='红细胞分布宽度sd 变异系数')
    rd_bld_cell_dist_widcv = fields.Float(string='红细胞分布宽度cv')
    platelet = fields.Float(string='血小板总数')
    mn_platelet_vol = fields.Float(string='血小板平均体积')
    platelet_dist_wd = fields.Float(string='血小板分布宽度')
    hematcrit = fields.Float(string='血小板压积')
    platelet_lg_cell_ratio = fields.Float(string='血小板大细胞比率')

    urn_leukocyte = fields.Char(string="尿-白细胞")
    urobilngen = fields.Char(string="尿-尿胆原")
    ur_ph = fields.Char(string="尿-ph")
    ur_spec_grv = fields.Char(string="尿-比重")
    ur_bllrbn = fields.Char(string="尿-胆红素")
    ur_ascrb_acd = fields.Char(string="尿-抗坏血酸")
    ur_ntrit = fields.Char(string="尿-亚硝酸盐")
    ur_prtn = fields.Char(string="尿-蛋白质")
    ur_occ_bld = fields.Char(string="尿-隐血")
    ur_ktn_bdy = fields.Char(string="尿-酮体")
    ur_gls = fields.Char(string="尿-葡萄糖")
    bcsj = fields.Char(string="")
    b = fields.Char(string="B超诊断")
    ecg_dignos = fields.Char(string="心电诊断")

    createDate = fields.Date(string="创建时间", default=fields.Date.today())
    createUser = fields.Char(string="创建人")
    lastModifyDate = fields.Date(string="修改时间", default=fields.Date.today())
    lastModifyUser = fields.Char(string="修改人")
    is_delete = fields.Selection([
        ('0', '否'),
        ('1', '是')],
        string="是否删除")

    bld_rt_doc = fields.Char(string="血常规医生")
    bld_rt_extract_time = fields.Date(string="血常规提取时间", default=fields.Date.today())
    ur_rt_doc = fields.Char(string="尿常规医生")
    ur_rt_extrt_time = fields.Date(string="尿常规提取时间", default=fields.Date.today())
    biochmst = fields.Char(string="生化医生")
    biochmst_extrt_time = fields.Date(string="生化提取时间", default=fields.Date.today())

    monocyte_prport = fields.Float(string='单核细胞比例')
    eos_prcnt = fields.Float(string='嗜酸性粒细胞比例')
    gralcyte_ratio = fields.Float(string='嗜碱性粒细胞比例')
    monocyte = fields.Float(string='单核细胞')
    eos = fields.Float(string='嗜酸性粒细胞')
    basphils = fields.Float(string='嗜碱性粒细胞')
    bon_min_dens_sos_val = fields.Float(string='骨密度Sos值')
    bon_min_dens_t_val = fields.Float(string='骨密度T值')
    bon_min_dens_z_val = fields.Float(string='骨密度Z值')

    is_bmd_nor = fields.Boolean(string="骨密度是否正常")
    bmd_recmmd = fields.Char(string="骨密度建议")

    wh_bld_visty_shr_one = fields.Float(string='全血粘度 切变率（1/s)')
    wh_bld_visty_shr_five = fields.Float(string='全血粘度 切变率（5/s）')
    wh_bld_visty_shr_thrt = fields.Float(string='全血粘度 切变率（30/s）')
    wh_bld_visty_shr_twhrd = fields.Float(string='全血粘度 切变率（200/s）')
    plasm_vscty = fields.Float(string='血浆粘度')
    esr = fields.Float(string='血沉')
    cmpct = fields.Float(string='压积')
    wh_bld_high_shr_relindx = fields.Float(string='全血高切相对指数')
    wh_bld_relindx = fields.Float(string='全血中切相对指数')
    wh_bld_low_ctrelindx = fields.Float(string='全血低切相对指数')
    esr_eq_kval = fields.Float(string='血沉方程K值')
    eryth_agrgt_indx = fields.Float(string='红细胞聚集指数')
    eryth_agrgt_coff = fields.Float(string='红细胞聚集系数')
    eryth_ele_indx = fields.Float(string='红细胞电泳指数')
    wh_bld_low_rdcvisct = fields.Float(string='全血低切还原粘度')
    wh_bld_mid_rdcvisct = fields.Float(string='全血中切还原粘度')
    wh_bld_high_rdcvisct = fields.Float(string='全血高切还原粘度')
    eryth_rigdty_indx = fields.Float(string='红细胞刚性指数')
    eryth_def_indxtk = fields.Float(string='红细胞变形指数TK')
    rd_bld_cell_cnt = fields.Float(string='红细胞计数')
    yld_str = fields.Float(string='屈服应力')
    hemoglbin = fields.Float(string='血红蛋白')
    eryth_viscos = fields.Float(string='红细胞内粘度')
    low_shr_rsist = fields.Float(string='低切流阻')
    mid_shr_rsist = fields.Float(string='中切流阻')
    high_shr_rsist = fields.Float(string='高切流阻')
